package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class IsrDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("osw.txt");
        InputStreamReader isr = new InputStreamReader(fis,StandardCharsets.UTF_8);

        int d;
        while ((d = isr.read())!=-1){
            System.out.println((char) d);//强转成字符，否则输出的是ASCII码
        }
        isr.close();



    }
}
